package com.boxin.ims.modules.sys.scheduler;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.boxin.framework.base.dao.DaoHelper;
import com.boxin.ims.modules.bi.dao.BIDao;
import com.boxin.ims.modules.wechat.entity.WechatMessageNear;
import com.boxin.ims.modules.wechat.service.WechatDaoHelper;
import com.boxin.ims.modules.wechat.service.WechatMessageNearService;
import com.thinkgem.jeesite.common.utils.DateUtils;

/**
 * 
 * @author xiaoqian
 * 将wp_wechat_message_near表中超过48小时数据删除
 *
*	2014上午11:11:42
 */
@Service
public class WechatMessageNearProcessScheduler  extends AbstractScheduler{
	
	private Logger logger = Logger.getLogger(WechatMessageNearProcessScheduler.class);
	@Autowired
	WechatDaoHelper wechatDaoHelper;
	
	
	@Autowired
	private BIDao biDao;
	
	public WechatMessageNearProcessScheduler(){
		super();
	}

	@Override
	public String frequency() {
		return this.getSchedulerInfo().getFrequence(); 
	}

	@Override
	public void process() {
		
		Map<String, Object> params=new HashMap<String, Object>();
		params.put("time", new  Date());
		
		biDao.deleteWechatMessageNear(params);
		
	}

}
